#include "iostream"
using namespace std;


int getAA1()
{
	int a;
	a = 10;
	return a;
}

//基础类型a返回的时候，也会有一个副本
int& getAA2()
{
	int a;
	a = 10;
	return a;
}

int* getAA3()  //出现路乱码
{
	int a;
	a = 10;
	return &a;
}



int main()
{
	int a1 = 0;
	int a2 = 0;

	a1 = getAA1();
	a2 = getAA2();

	int &a3 = getAA2();

	printf("a1:%d \n", a1);
	printf("a2:%d \n", a2); 
	printf("a3:%d \n", a3); 


	return 0;
}
